#!/bin/bash

cd `dirname $0`
dir=`pwd`
app_version=1.4.6
app_path=$dir/rkhunter-$app_version

# wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz
# wget https://gitee.com/azhao-1981/opcr/raw/master/linux/sec/rkhunter-1.4.6.tar.gz
wget https://gitee.com/azhao-1981/opcr/raw/master/linux/sec/rkhunter-$app_version.tar.gz
tar xzvf rkhunter*
cd $app_path
./installer.sh --layout /usr --install
rkhunter --update

# rkhunter --lang cn -c --sk
# --rwo参数仅输出warning信息：
# rkhunter --lang cn -c --sk --rwo
# 我们还可以用-l参数指定写入的日志：
rkhunter --lang cn -c --sk -l rkhunter.log

# apt install prelink -y
# prelink --verify --sha /usr/bin/fgrep